Last change
on this file since 16724 was
16333,
checked in by bburlacu, 6 years ago
|
#2958: Native interpreter dlls: statically link against the visual C++ runtime
|
File size:
1.5 KB
|
Rev | Line | |
---|
[16269] | 1 | cmake_minimum_required(VERSION 3.0)
|
---|
| 2 |
|
---|
| 3 | project(
|
---|
| 4 | hl-native-interpreter
|
---|
| 5 | VERSION 0.1
|
---|
| 6 | DESCRIPTION "Native C++ interpreter for HeuristicLab symbolic expression trees"
|
---|
| 7 | LANGUAGES CXX
|
---|
| 8 | )
|
---|
| 9 |
|
---|
| 10 | add_library(hl-native-interpreter SHARED src/interpreter.cpp)
|
---|
| 11 | target_include_directories(hl-native-interpreter PRIVATE ${PROJECT_SOURCE_DIR}/src ${PROJECT_SOURCE_DIR}/lib)
|
---|
| 12 | target_compile_features(hl-native-interpreter PRIVATE cxx_std_17)
|
---|
| 13 |
|
---|
| 14 | add_library(hl-native-interpreter-vdt SHARED src/interpreter.cpp)
|
---|
| 15 | target_include_directories(hl-native-interpreter-vdt PRIVATE ${PROJECT_SOURCE_DIR}/src ${PROJECT_SOURCE_DIR}/lib)
|
---|
| 16 | target_compile_features(hl-native-interpreter-vdt PRIVATE cxx_std_17)
|
---|
| 17 |
|
---|
| 18 | if(MSVC)
|
---|
[16333] | 19 | target_compile_options(hl-native-interpreter PRIVATE "/W4" "/Qvec-report:2" "/MT" "$<$<CONFIG:Release>:/O2>")
|
---|
| 20 | target_compile_options(hl-native-interpreter-vdt PRIVATE "/W4" "/Qvec-report:2" "/MT" "$<$<CONFIG:Release>:/O2>")
|
---|
[16274] | 21 | target_compile_definitions(hl-native-interpreter-vdt PRIVATE "USE_VDT")
|
---|
[16269] | 22 | else()
|
---|
[16274] | 23 | target_compile_options(hl-native-interpreter PRIVATE "-Wall" "-Wextra" "-Werror" "-fopt-info-vec-optimized" "$<$<CONFIG:Release>:-O3;-march=x86-64>")
|
---|
| 24 | target_compile_options(hl-native-interpreter-vdt PRIVATE "-Wall" "-Wextra" "-Werror" "-fopt-info-vec-optimized" "$<$<CONFIG:Release>:-O3;-march=x86-64>")
|
---|
[16269] | 25 | target_compile_definitions(hl-native-interpreter-vdt PRIVATE "USE_VDT")
|
---|
[16274] | 26 | set_target_properties(hl-native-interpreter PROPERTIES PREFIX "")
|
---|
| 27 | set_target_properties(hl-native-interpreter-vdt PROPERTIES PREFIX "")
|
---|
[16269] | 28 | endif()
|
---|
Note: See
TracBrowser
for help on using the repository browser.