Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

CMake 3.7.2 Is Not Pulling the Right Compiler #2

Closed
aserio opened this issue May 5, 2017 · 0 comments
Closed

CMake 3.7.2 Is Not Pulling the Right Compiler #2

aserio opened this issue May 5, 2017 · 0 comments

Comments

@aserio
Copy link

aserio commented May 5, 2017

When using CMake to build my project, CMake grabs /usr/bin/c++ to compile my code which is set to gcc 4.8.5. This is not the compiler that I have loaded (gcc/6.3.0). This is the error I see:

-- WARNING: Compilers do not match. In order to compile HPX application it is recommended to use the same compiler as you did for HPX. HPX_CXX_COMPILER=/opt/mn/gcc/6.3.0/bin/c++, CMAKE_CXX_COMPILER=/usr/bin/c++. HPX_CXX_COMPILER_ID=GNU, CMAKE_CXX_COMPILER_ID=GNU. To disable this message set HPX_IGNORE_COMPILER_COMPATIBILITY to On.
-- Using tcmalloc allocator.
CMake Warning at CMakeLists.txt:9 (find_package):
Found package configuration file:

/home/aserio/lib/hpx_v1.0.0-gcc6.3.0/lib/cmake/HPX/HPXConfig.cmake

but it set HPX_FOUND to FALSE so package "HPX" is considered to be NOT
FOUND. Reason given by package:

Compilers do not match. In order to compile HPX application it is;
recommended to use the same compiler as you did for HPX.
;HPX_CXX_COMPILER=/opt/mn/gcc/6.3.0/bin/c++,
;CMAKE_CXX_COMPILER=/usr/bin/c++. ;HPX_CXX_COMPILER_ID=GNU,
;CMAKE_CXX_COMPILER_ID=GNU. ;To disable this message set
HPX_IGNORE_COMPILER_COMPATIBILITY to On.

I was able to work around the problem by manually setting the compiler path.

@akheir akheir closed this as completed Mar 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants