Skip to content

CMake Error& Compile Error in Centos 7 #1

@ChrisZhangJin

Description

@ChrisZhangJin

the CMakeList.txt will raise error in Centos 7

project(SimpleDenoise LANGUAGES C) # change to project(SimpleDenoise)

After that, cmake runs OK. but compilation failed.
the C-compilation must comply with C99 stadand, so I added this

set(CMAKE_C_FLAGS "-std=c99")

the C-style compilation errors have gone, however, there is still issue in main.c.
the author uses some object that comes from c++11, so I need to add the c++11 support in the CMakeList.txt too

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

Anyway, it's working now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions