Files
FESADev/CMakeLists.txt
T
2026-05-05 00:35:31 +09:00

30 lines
931 B
CMake

cmake_minimum_required(VERSION 3.20)
project(FESA VERSION 0.1.0 LANGUAGES CXX)
file(GLOB_RECURSE FESA_CORE_SOURCES CONFIGURE_DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp"
)
add_library(fesa_core STATIC ${FESA_CORE_SOURCES})
target_include_directories(fesa_core PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
)
target_compile_features(fesa_core PUBLIC cxx_std_17)
enable_testing()
add_executable(fesa_tests tests/test_main.cpp)
target_link_libraries(fesa_tests PRIVATE fesa_core)
target_compile_definitions(fesa_tests PRIVATE FESA_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
if(MSVC)
target_compile_options(fesa_core PRIVATE /W4 /permissive-)
target_compile_options(fesa_tests PRIVATE /W4 /permissive-)
else()
target_compile_options(fesa_core PRIVATE -Wall -Wextra -Wpedantic)
target_compile_options(fesa_tests PRIVATE -Wall -Wextra -Wpedantic)
endif()
add_test(NAME fesa_tests COMMAND fesa_tests)