The standalone library is now compiled in parallel with the core library. Slightly faster.

This commit is contained in:
jpekkila
2019-07-23 21:26:58 +03:00
parent be44354b33
commit 26316a4d15

View File

@@ -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()