gctl_optimization/example/CMakeLists.txt

22 lines
642 B
CMake
Raw Normal View History

2024-09-10 20:04:47 +08:00
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin/examples)
macro(add_example name switch)
if(${switch})
add_executable(${name} ${name}.cpp)
set_target_properties(${name} PROPERTIES CXX_STANDARD 17 CXX_STANDARD_REQUIRED ON)
target_link_libraries(${name} PRIVATE ${GCTL_LIB})
target_link_libraries(${name} PRIVATE gctl_optimization)
endif()
endmacro()
add_example(ex1 ON)
add_example(ex2 ON)
add_example(ex3 ON)
add_example(ex4 ON)
add_example(ex5 ON)
add_example(ex6 ON)
add_example(ex7 ON)
2024-10-17 13:20:02 +08:00
add_example(ex8 ON)
2024-11-26 16:57:00 +08:00
add_example(ex9 ON)
add_example(ex10 ON)