|
|
@@ -4,12 +4,21 @@
|
|
|
cmake_minimum_required(VERSION 3.1)
|
|
|
project(EAStdC CXX)
|
|
|
|
|
|
+#-------------------------------------------------------------------------------------------
|
|
|
+# Options
|
|
|
+#-------------------------------------------------------------------------------------------
|
|
|
+option(EASTDC_BUILD_TESTS "Enable generation of build files for tests" OFF)
|
|
|
+
|
|
|
#-------------------------------------------------------------------------------------------
|
|
|
# Library definition
|
|
|
#-------------------------------------------------------------------------------------------
|
|
|
-file(GLOB EASTDC_SOURCES "source/*.cpp" "include/EAStdC/*.h")
|
|
|
+file(GLOB EASTDC_SOURCES "source/*.cpp")
|
|
|
add_library(EAStdC ${EASTDC_SOURCES})
|
|
|
|
|
|
+if(EASTDC_BUILD_TESTS)
|
|
|
+ add_subdirectory(test)
|
|
|
+endif()
|
|
|
+
|
|
|
#-------------------------------------------------------------------------------------------
|
|
|
# Defines
|
|
|
#-------------------------------------------------------------------------------------------
|
|
|
@@ -17,11 +26,6 @@ add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
|
|
add_definitions(-D_SCL_SECURE_NO_WARNINGS)
|
|
|
add_definitions(-D_CHAR16T)
|
|
|
|
|
|
-#-------------------------------------------------------------------------------------------
|
|
|
-# Compiler Flags
|
|
|
-#-------------------------------------------------------------------------------------------
|
|
|
-# set (CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_CURRENT_SOURCE_DIR}/../../../scripts/CMake")
|
|
|
-# include(CommonCppFlags)
|
|
|
|
|
|
#-------------------------------------------------------------------------------------------
|
|
|
# Include directories
|