diff --git a/.travis.yml b/.travis.yml index 3e34afa..16bb883 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,10 +34,7 @@ jobs: addons: apt: - sources: - - llvm-toolchain-xenial-6.0 packages: - - clang-6.0 - ninja-build install: diff --git a/build/CMakeLists.txt b/build/CMakeLists.txt index be76f52..ac27054 100644 --- a/build/CMakeLists.txt +++ b/build/CMakeLists.txt @@ -5,11 +5,6 @@ set(LIBS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/artifacts) set(PROJECT_NAME hookman) set(ARTIFACTS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/artifacts) -if(NOT WIN32) - set(CMAKE_C_COMPILER clang) - set(CMAKE_CXX_COMPILER clang++) -endif(NOT WIN32) - project (hookman LANGUAGES CXX C) include(HookManConfig) diff --git a/build/HookManConfig.cmake b/build/HookManConfig.cmake index c5b5506..bec90a0 100644 --- a/build/HookManConfig.cmake +++ b/build/HookManConfig.cmake @@ -28,8 +28,9 @@ if(NOT WIN32) message(STATUS "Found GCC base directory: ${GCC_BASE_DIR}") + set(CMAKE_CXX_STANDARD 11) + set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_FLAGS "-Wall") - set(CMAKE_CXX_LINK_FLAGS "-lstdc++") set(CMAKE_CXX_FLAGS_DEBUG "-g") endif(NOT WIN32) diff --git a/environment.devenv.yml b/environment.devenv.yml index 9d51980..6da248f 100644 --- a/environment.devenv.yml +++ b/environment.devenv.yml @@ -17,7 +17,14 @@ dependencies: - cmake >=3.5.2 {% if os.sys.platform != 'win32' %} - - clangdev>=6.0.0 + - conda-forge::gcc_linux-64==7.3.0 + - conda-forge::gcc_impl_linux-64==7.3.0 + - conda-forge::gxx_linux-64==7.3.0 + - conda-forge::gxx_impl_linux-64==7.3.0 + - libgcc-ng==7.3.0 + - libstdcxx-ng==7.3.0 + - binutils_linux-64==2.31.1 + - binutils_impl_linux-64==2.31.1 {% endif %} {% if os.sys.platform == 'win32' %} diff --git a/hookman/hookman_generator.py b/hookman/hookman_generator.py index ae6bb4a..fbb17f2 100644 --- a/hookman/hookman_generator.py +++ b/hookman/hookman_generator.py @@ -589,13 +589,12 @@ def _plugin_cmake_file_content(self, plugin_id): set(ARTIFACTS_DIR ${{CMAKE_CURRENT_SOURCE_DIR}}/artifacts) if(NOT WIN32) - set(CMAKE_C_COMPILER clang) - set(CMAKE_CXX_COMPILER clang++) set(CMAKE_C_FLAGS "-Wall -std=c99") set(CMAKE_C_FLAGS_DEBUG "-g") endif(NOT WIN32) - set(CMAKE_CXX_LINK_FLAGS "-lstdc++") + set(CMAKE_CXX_STANDARD 11) + set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_FLAGS_DEBUG "-g") set(CMAKE_C_STANDARD 99) diff --git a/tests/test_hookman_generator/generate_CMakeLists.txt b/tests/test_hookman_generator/generate_CMakeLists.txt index c3154ca..563a192 100644 --- a/tests/test_hookman_generator/generate_CMakeLists.txt +++ b/tests/test_hookman_generator/generate_CMakeLists.txt @@ -4,13 +4,12 @@ set(PROJECT_NAME acme) set(ARTIFACTS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/artifacts) if(NOT WIN32) - set(CMAKE_C_COMPILER clang) - set(CMAKE_CXX_COMPILER clang++) set(CMAKE_C_FLAGS "-Wall -std=c99") set(CMAKE_C_FLAGS_DEBUG "-g") endif(NOT WIN32) -set(CMAKE_CXX_LINK_FLAGS "-lstdc++") +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_FLAGS_DEBUG "-g") set(CMAKE_C_STANDARD 99) diff --git a/tox.ini b/tox.ini index b9e76d4..77bde57 100644 --- a/tox.ini +++ b/tox.ini @@ -17,6 +17,11 @@ conda_deps = pybind11>=2.3.0 ninja cmake + compilers + conda-forge::gcc_linux-64==7.3.0 + conda-forge::gcc_impl_linux-64==7.3.0 + conda-forge::gxx_linux-64==7.3.0 + conda-forge::gxx_impl_linux-64==7.3.0 conda_channels = conda-forge