You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Matt Massie (JIRA)" <ji...@apache.org> on 2010/03/15 21:35:27 UTC
[jira] Commented: (AVRO-440) config.h output not correctly used
[ https://issues.apache.org/jira/browse/AVRO-440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845512#action_12845512 ]
Matt Massie commented on AVRO-440:
----------------------------------
This patch doesn't work, as is, on CentOS 5.4 using cmake 2.4.
I was able to get it to build using the following changes:
{code}
diff --git a/lang/c/CMakeLists.txt b/lang/c/CMakeLists.txt
index e675154..df596c6 100644
--- a/lang/c/CMakeLists.txt
+++ b/lang/c/CMakeLists.txt
@@ -16,7 +16,7 @@
# specific language governing permissions and limitations
# under the License.
#
-cmake_minimum_required(VERSION 2.6)
+cmake_minimum_required(VERSION 2.4)
project(AvroC)
enable_testing()
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/../../share/VERSION.txt" AVRO_VERSION)
@@ -25,9 +25,9 @@ if(APPLE)
set(CMAKE_OSX_ARCHITECTURES "ppc;i386;x86_64" CACHE STRING "Build architectures for Mac OS X" FORCE)
endif(APPLE)
-if(CMAKE_COMPILER_IS_GNUCC)
- set(WARNING_FLAGS "-W -Wall")
-endif(CMAKE_COMPILER_IS_GNUCC)
+#if(CMAKE_COMPILER_IS_GNUCC)
+# set(WARNING_FLAGS "-W -Wall")
+#endif(CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} ${WARNING_FLAGS})
include_directories(${AvroC_SOURCE_DIR}/src)
{code}
Since I know very little about CMake it would be nice to know the Right way to do this.
> config.h output not correctly used
> ----------------------------------
>
> Key: AVRO-440
> URL: https://issues.apache.org/jira/browse/AVRO-440
> Project: Avro
> Issue Type: Bug
> Components: c
> Affects Versions: 1.3.0
> Reporter: Bruce Mitchener
> Assignee: Bruce Mitchener
> Fix For: 1.3.1
>
> Attachments: avro_config_h_check.diff
>
>
> While config.h is generated, it is only included from within st.c to make some things work correctly within st.h.
> I would suggest changing things a little:
> * Put an include of config.h into src/avro_private.h
> * Include avro_private.h into all .c files.
> * Not sure if the values from config.h are needed in any of the tests or examples ... I would hope not though and that this is fully insulated from being visible within anything exposed by avro.h.
> Given some feedback, I can readily prepare a patch.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.