feat(solver-bootstrap): step 1 — cmake-project-scaffold
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
cmake_minimum_required(VERSION 3.30)
|
||||
|
||||
project(FESA VERSION 0.1.0 LANGUAGES CXX)
|
||||
|
||||
if(NOT MSVC)
|
||||
message(FATAL_ERROR "FESA requires the Microsoft Visual C++ compiler (MSVC v145).")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_VS_PLATFORM_TOOLSET STREQUAL "v145")
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"FESA requires the v145 platform toolset; configured toolset is "
|
||||
"'${CMAKE_VS_PLATFORM_TOOLSET}'."
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_GENERATOR_PLATFORM STREQUAL "x64")
|
||||
message(FATAL_ERROR "FESA requires the x64 generator platform.")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
message(FATAL_ERROR "FESA requires a 64-bit target.")
|
||||
endif()
|
||||
|
||||
include(cmake/FesaDependencies.cmake)
|
||||
|
||||
add_library(fesa_core STATIC
|
||||
src/fesa/core/version.cpp
|
||||
)
|
||||
|
||||
target_include_directories(fesa_core
|
||||
PUBLIC
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/include"
|
||||
)
|
||||
|
||||
target_compile_features(fesa_core PUBLIC cxx_std_20)
|
||||
target_compile_options(fesa_core PRIVATE /W4 /permissive- /EHsc)
|
||||
|
||||
add_executable(fesa
|
||||
src/fesa/cli/main.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(fesa PRIVATE fesa_core)
|
||||
target_compile_features(fesa PRIVATE cxx_std_20)
|
||||
target_compile_options(fesa PRIVATE /W4 /permissive- /EHsc)
|
||||
|
||||
include(CTest)
|
||||
|
||||
if(BUILD_TESTING)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
Reference in New Issue
Block a user