how to remove xc++ flag

Dear all,

Some of my projects are compiled using pgc++, which does not need the "-xc++" flag. However when I use Clion, it add the -xc++ by default and cause error. How could I remove the xc++ flag.

 

My CMakeLists.txt:

project(test)

set(CMAKE_CXX_FLAGS "-std=c++11")

set(SOURCE_FILES main.cpp)

add_executable(test ${SOURCE_FILES})

 

Error Message:

Compiler exited with error code 2: pgc++ -xc++ -std=c++11 -g -O0 -fpch-preprocess -v -dD -E

/usr/bin/ld: cannot open linker script file ++: No such file or directory

 

Thank you.

0
1 comment
Avatar
Permanently deleted user

I am sorry by Reload changes of the CMakeLists.txt, the xc++ flag is gone.

Sorry for my careless report about Clion, there is actually no problem at all. Would the manager please help me to have this post removed? Thank you.

0

Please sign in to leave a comment.