Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change cmake config to use gcc #76

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ jobs:

addons:
apt:
sources:
volpatto marked this conversation as resolved.
Show resolved Hide resolved
- llvm-toolchain-xenial-6.0
packages:
- clang-6.0
- ninja-build

install:
Expand Down
5 changes: 0 additions & 5 deletions build/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion build/HookManConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
9 changes: 8 additions & 1 deletion environment.devenv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment on lines +20 to +23
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These packages cannot be found at the moment. Further investigation is required.

- 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' %}
Expand Down
5 changes: 2 additions & 3 deletions hookman/hookman_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 2 additions & 3 deletions tests/test_hookman_generator/generate_CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down