# Cmake issue : Target "cmTC\_1bcff" requires the language dialect "CXX17" , but CMake does not know th

**URL:** <https://gromacs.bioexcel.eu/t/cmake-issue-target-cmtc-1bcff-requires-the-language-dialect-cxx17-but-cmake-does-not-know-th/6536>\
**Category:** User discussions\
**Tags:** installation-error\
**Created:** [June 2, 2023, 11:17am UTC](https://gromacs.bioexcel.eu/t/cmake-issue-target-cmtc-1bcff-requires-the-language-dialect-cxx17-but-cmake-does-not-know-th/6536 "2023-06-02T11:17:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Makrand](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@Makrand](https://gromacs.bioexcel.eu/u/Makrand)\
**Post date:** [June 2, 2023, 11:17am UTC](https://gromacs.bioexcel.eu/t/cmake-issue-target-cmtc-1bcff-requires-the-language-dialect-cxx17-but-cmake-does-not-know-th/6536/1 "2023-06-02T11:17:02Z")

</div>

GROMACS version: 2022.4  
GROMACS modification: Yes/No  
Here post your question

Hi,

while running the cmake command from build directory, I am facing following issue,

* * *

cmake … -DGMX\_BUILD\_OWN\_FFTW=ON -DREGRESSIONTEST\_DOWNLOAD=ON -DCMAKE\_INSTALL\_PREFIX=/data/staff/makrand/mak/gromacs/INSTALL -DCMAKE\_CXX\_COMPILER=/usr/bin/gcc

CMake Error in /data/staff/makrand/mak/gromacs/gromacs-2022.4/build/CMakeFiles/CMakeTmp/CMakeLists.txt:  
Target “cmTC\_1bcff” requires the language dialect “CXX17” , but CMake does  
not know the compile flags to use to enable it.

CMake Error at /data/staff/makrand/mak/CMAKE/cmake-3.16.3/INSTALL/share/cmake-3.16/Modules/FindOpenMP.cmake:201 (try\_compile):  
Failed to generate test project build system.  
Call Stack (most recent call first):  
/data/staff/makrand/mak/CMAKE/cmake-3.16.3/INSTALL/share/cmake-3.16/Modules/FindOpenMP.cmake:427 (\_OPENMP\_GET\_FLAGS)  
cmake/gmxManageOpenMP.cmake:41 (find\_package)  
CMakeLists.txt:295 (include)

– Configuring incomplete, errors occurred!  
See also “/data/staff/makrand/mak/gromacs/gromacs-2022.4/build/CMakeFiles/CMakeOutput.log”.

* * *

---

<div class="post-metadata">

**Author:** ![al42and](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/al42and/32/1393_2.png) [@al42and](https://gromacs.bioexcel.eu/u/al42and)\
**Post date:** [June 2, 2023, 11:25am UTC](https://gromacs.bioexcel.eu/t/cmake-issue-target-cmtc-1bcff-requires-the-language-dialect-cxx17-but-cmake-does-not-know-th/6536/2 "2023-06-02T11:25:33Z")

</div>

Hi!

You are setting `-DCMAKE_CXX_COMPILER=/usr/bin/gcc`, but `gcc` is a C compiler, not C++. You should use `-DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++` instead.

Not related to your issue: 2022.5 is released, so we would suggest using it instead of an older version.
