Skip to content

Commit

Permalink
Fix warning when building with clang
Browse files Browse the repository at this point in the history
- License file extension is lowercase.
- Forgot to remove the status cmake message.
  • Loading branch information
casch-at committed May 29, 2016
1 parent e2ba2be commit ddd434c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if (RTAGS_ENABLE_DEV_OPTIONS)
set(CPACK_PACKAGE_VERSION_MAJOR ${RTAGS_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${RTAGS_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_DATABASE ${RTAGS_VERSION_DATABASE})
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.TXT")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt")
set(CPACK_PACKAGE_VERSION "${RTAGS_VERSION}")
include(CPack)
endif ()
Expand Down
12 changes: 6 additions & 6 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -309,11 +309,11 @@ might fit better than the other, depending on your project build system.

- [[https://github.com/rizsotto/Bear][Bear]]

If you have a pure makefile based project you can use =bear= to generate a
compile_commands.json file. However, if you are cross-compiling you probably
need to adjust the command entries in the compile_commands.json file to match
the correct compiler. Further, make sure you clean your project before
invoking =bear=.
For other projects you can use =bear= to generate a compile_commands.json
file. However, if you are cross-compiling you probably need to adjust the
command entries in the compile_commands.json file to match the correct
compiler. Furthermore, make sure you clean your project before invoking
=bear=.

#+BEGIN_SRC sh
make clean
Expand All @@ -328,7 +328,7 @@ might fit better than the other, depending on your project build system.
- =make=

You can ask =make= to only print the recipes without actually doing something.
This might be perfectly fine for not too complex makefiles.
This way may be perfectly fine for not too complex Makefiles.

#+BEGIN_SRC sh
make clean
Expand Down
13 changes: 7 additions & 6 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ set(RCT_NO_LIBRARY 1)
# doesn't need to be set in this file again.
include(rct/rct.cmake)

message(STATUS "AFTER compiler.cmake ${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wstrict-aliasing=2 -Wcast-qual -fPIC")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wstrict-aliasing=2 -Wcast-qual -fPIC")
if (NOT CYGWIN)
Expand Down Expand Up @@ -150,11 +149,13 @@ if (LUA_FOUND)
set(RTAGS_LIBRARIES ${RTAGS_LIBRARIES} ${LUA_LIBRARIES})
include_directories(${LUA_INCLUDE_DIR})
add_definitions(-DRTAGS_HAS_LUA)
if (APPLE)
set_source_files_properties(AST.cpp PROPERTIES COMPILE_FLAGS "-Wno-unused-parameter -Wno-unused-variable -ftemplate-depth=2000 -Wno-cast-qual")
elseif (UNIX)
set_source_files_properties(AST.cpp PROPERTIES COMPILE_FLAGS "-Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-parameter -ftemplate-depth=2000 -Wno-cast-qual")
endif ()
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
set_source_files_properties(AST.cpp PROPERTIES
COMPILE_FLAGS "-Wno-unused-parameter -Wno-unused-variable -ftemplate-depth=2000 -Wno-cast-qual")
else ()
set_source_files_properties(AST.cpp PROPERTIES
COMPILE_FLAGS "-Wno-unused-but-set-parameter -Wno-unused-parameter -Wno-unused-variable -ftemplate-depth=2000 -Wno-cast-qual")
endif()
endif ()

# RCT_LIBRARIES and stdc++ library must be at the end
Expand Down

0 comments on commit ddd434c

Please sign in to comment.