Skip to content

Commit

Permalink
cmake: set supported language the right way
Browse files Browse the repository at this point in the history
the second param of enable_launage() is not used, we should call it
multiple times to enable more than one language. switch to project()
command for simplicity.

also, define the PROJECT_VERSION using project() command, and switch to
it in the config-h.in.cmake

Signed-off-by: Kefu Chai <kchai@redhat.com>
  • Loading branch information
tchaikov committed Oct 10, 2017
1 parent 6cd9c71 commit 8bf30fd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
@@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 2.8.11)

project(ceph)
project(ceph
VERSION 12.1.2
LANGUAGES CXX C ASM)
set(VERSION 12.1.2)

if(POLICY CMP0046)
Expand Down
1 change: 0 additions & 1 deletion src/CMakeLists.txt
@@ -1,6 +1,5 @@
include(GetGitRevisionDescription)

enable_language(C ASM)
include(GNUInstallDirs)
# for erasure and compressor plugins
set(CMAKE_INSTALL_PKGLIBDIR ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME})
Expand Down
2 changes: 1 addition & 1 deletion src/include/config-h.in.cmake
Expand Up @@ -293,7 +293,7 @@
#cmakedefine HAVE_STATIC_CAST

/* Version number of package */
#cmakedefine VERSION "@VERSION@"
#cmakedefine VERSION "@PROJECT_VERSION@"

/* Defined if pthread_setname_np() is available */
#cmakedefine HAVE_PTHREAD_SETNAME_NP 1
Expand Down

0 comments on commit 8bf30fd

Please sign in to comment.