diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a5054f..0ecbe17 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,18 +1,5 @@ cmake_minimum_required(VERSION 3.13) -# If a defined C Compiler is not set -if (NOT CMAKE_C_COMPILER) - # If the GCC flag is set, use GCC - if (GCC) - set(CMAKE_C_COMPILER "gcc") - set(CMAKE_CXX_COMPILER "g++") - # Otherwise default to clang - else() - set(CMAKE_C_COMPILER "clang") - set(CMAKE_CXX_COMPILER "clang++") - endif(GCC) -endif(NOT CMAKE_C_COMPILER) - # Make warnings trigger errors. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror") @@ -51,6 +38,7 @@ target_link_libraries(CreatureLibBattling CreatureLibLibrary) target_link_libraries(CreatureLibTests CreatureLibLibrary) if (WINDOWS) + set (CMAKE_CXX_FLAGS "-Wl,-allow-multiple-definition") # Statically link libraries we need in Windows. target_link_libraries(CreatureLibCore -static -static-libgcc -static-libstdc++) target_link_libraries(CreatureLibLibrary -static -static-libgcc -static-libstdc++)