From 26316a4d15da4f6fef306880ed8aef9f504d51bb Mon Sep 17 00:00:00 2001 From: jpekkila Date: Tue, 23 Jul 2019 21:26:58 +0300 Subject: [PATCH] The standalone library is now compiled in parallel with the core library. Slightly faster. --- src/standalone/CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/standalone/CMakeLists.txt b/src/standalone/CMakeLists.txt index bb530e5..9ca17e5 100644 --- a/src/standalone/CMakeLists.txt +++ b/src/standalone/CMakeLists.txt @@ -23,12 +23,14 @@ add_compile_options(-march=native -pipe ${OpenMP_CXX_FLAGS}) add_compile_options(-Wall -Wextra -Werror -Wdouble-promotion -Wfloat-conversion)# -Wshadow) ## Compile and link -add_executable(ac_run ${SOURCES}) -target_link_libraries(ac_run PRIVATE "${OpenMP_CXX_FLAGS}" astaroth_core ${SDL2_LIBRARY}) +add_library(astaroth_standalone ${SOURCES}) + +add_executable(ac_run main.cc) +target_link_libraries(ac_run PRIVATE astaroth_standalone astaroth_core "${OpenMP_CXX_FLAGS}" ${SDL2_LIBRARY}) # Define the config directory if (ALTER_CONF) - target_compile_definitions(ac_run PRIVATE CONFIG_PATH="${CMAKE_BINARY_DIR}/") + target_compile_definitions(astaroth_standalone PRIVATE CONFIG_PATH="${CMAKE_BINARY_DIR}/") else() - target_compile_definitions(ac_run PRIVATE CONFIG_PATH="${CMAKE_SOURCE_DIR}/config/") + target_compile_definitions(astaroth_standalone PRIVATE CONFIG_PATH="${CMAKE_SOURCE_DIR}/config/") endif()